1. Technical Field
The present invention is related to computer graphics processing and more particularly to a system and method for rendering a texture map utilizing an illumination modulation value.
2. Background
Various techniques have been utilized to render graphical images via computer systems. One technique that has received appreciable attention is texture mapping. A texture refers to a graphics data structure which models the surface appearance of an object. A texture may represent the visual experience of many materials and substances (e.g., terrain, plants, minerals, fur, and skin). Textures may be created digitally by sampling a physical surface utilizing photographic techniques. Alternatively, textures may be created manually utilizing a suitable graphics design application. Texture mapping involves mapping the surface appearance to a graphical surface modeled by a three-dimensional structure.
Texture mapping may be utilized for any number of applications. For example, texture mapping may be utilized by an architectural software application to generate a realistic depiction of a building based upon blueprint designs. For example, a stucco texture may be wrapped onto a building frame by the architectural software application. Texture mapping may be additionally used to create special effects for movies, video game animation, website wallpapers, and/or the like. Texture mapping is desirable for these applications, because it facilitates the representation of an object with an appreciable amount of realism and detail. Moreover, texture mapping imparts three-dimensional qualities to the computer generated image.
Texture mapping algorithms involve wrapping a texture over the surface of a model. Specifically, a three-dimensional model or data structure of an object is created. For example, FIG. 1A depicts exemplary object 101 in three-dimensional real space (R3). The surface of object 101 may be represented as a set of polygons (typically triangles) in three-dimensional space. The polygons are represented by their various vertexes. The vertexes are defined by coordinates in three-dimensional real space (R3). For example, vertex 102 is defined by (x1, y1, z1) and vertex 103 is defined by (x2, y2, z2)
However, most computer displays are only capable of displaying graphical images in two dimensions. Accordingly, a mapping function is utilized to map the coordinates in three-dimensional real space (R3) to coordinates in two-dimensional real space (R2). Typically, the mapping occurs by defining a view angle. FIG. 1B depicts such a mapping from object 101 of FIG. 1A to object 104. Vertex 102 is mapped to vertex 105 where vertex 105 is defined by two coordinates (x3, y3). Likewise, vertex 103 is mapped to vertex 106 where vertex 106 is defined by two coordinates (x4, y4). The mapping function allows the data to be represented in a form that may be displayed by a computer display.
Concurrently with the mapping, a texture is applied within the confines of the polygons of object 104 to provide a realistic appearance. For example, texture 201 of FIG. 2 may be applied to the polygons of object 104 to create a stone-like appearance. Texture 201 is typically implemented as a matrix of red, green, and blue (RGB) values. The RGB values are mapped utilizing a suitable mapping function to the interior of the polygons of object 104. The final graphical image appears to have texture 201 xe2x80x9cwrappedxe2x80x9d around object 104.
However, this approach is limited as the final graphical image, to an extent, appears flat. Specifically, the graphical image does not appreciably vary in response to a change in illumination direction. Since it does not appreciably change under these conditions, localized shading or occlusions are not evident. Moreover, interreflections due to surface irregularities are not perceived.
Bump mapping is a technique to address these limitations. Bump mapping involves creating a bump map of displacement values. The displacement values are utilized to perturb the surface normal vector. The perturbed surface normal vector is utilized to rendering shading in accordance with the Blinn/Phong lighting equation. Although bump mapping techniques do provide optical effects that are not present in RGB texture mapping techniques, the degree of realism produced by bump maps is limited. Moreover, bump mapping is problematic, because the creation of the displacement values may, particularly from actual samples, be cumbersome.
In one embodiment, the present invention is directed to a system for rendering a pixel of a digital image. The system may comprise a texture map data structure representing a texture map of a plurality of texels; the texture map structure comprising a plurality of coefficients for each texel of the texture map; the plurality of coefficients defining lighting characteristics of the respective texel in response to illumination in a plane. The system may further comprise a modulation data structure; the modulation data structure defining a range of values associated with an illumination vector. Additionally, the system may comprise a rendering algorithm; the rendering algorithm operable to calculate a texel display value using the texture map data structure; the rendering algorithm operable to determine an illumination modulation value from the modulation data structure; and the rendering algorithm being operable to multiply the texel display value by the illumination modulation value to render a pixel.